import React from 'react';
import { inject, observer } from 'mobx-react';
import { WeaLocaleProvider } from 'ecCom';

import IntroStep3 from './portalintro/IntroStep3';

const getLabel = WeaLocaleProvider.getLabel;

@inject('portalThemeStore')
@observer
class E9FreqUseMenu extends React.Component {
  constructor(props) {
    super(props);
  }

  componentWillMount() {
    const { portalThemeStore } = this.props;
    portalThemeStore.getFreqUseMenu();
  }

  render() {
    const { portalThemeStore } = this.props;
    const { showFreqUseMenu } = portalThemeStore;

    // 不显示常用菜单
    if (!showFreqUseMenu) {
      return null;
    }

    return (
      <div className="e9header-freq-use-menu" title={getLabel(129413, '常用菜单')}>
        <IntroStep3 ecId={`${(this && this.props && this.props.ecId) || ''}_IntroStep3@31xk9j`} />
      </div>
    );
  }
}

export default E9FreqUseMenu;
